function varargout = stageTHREEgui(varargin)
% STAGETHREEGUI MATLAB code for stageTHREEgui.fig
%      STAGETHREEGUI, by itself, creates a new STAGETHREEGUI or raises the existing
%      singleton*.
%
%      H = STAGETHREEGUI returns the handle to a new STAGETHREEGUI or the handle to
%      the existing singleton*.
%
%      STAGETHREEGUI('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in STAGETHREEGUI.M with the given input arguments.
%
%      STAGETHREEGUI('Property','Value',...) creates a new STAGETHREEGUI or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before stageTHREEgui_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to stageTHREEgui_OpeningFcn via varargin.
%
%      *See GUI Options on GUIDE's Tools menu.  Choose "GUI allows only one
%      instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help stageTHREEgui

% Last Modified by GUIDE v2.5 04-Nov-2013 00:59:21

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @stageTHREEgui_OpeningFcn, ...
                   'gui_OutputFcn',  @stageTHREEgui_OutputFcn, ...
                   'gui_LayoutFcn',  [] , ...
                   'gui_Callback',   []);
if nargin && ischar(varargin{1})
    gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
    [varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
    gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT


% --- Executes just before stageTHREEgui is made visible.
function stageTHREEgui_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)
% varargin   command line arguments to stageTHREEgui (see VARARGIN)

% Choose default command line output for stageTHREEgui
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes stageTHREEgui wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = stageTHREEgui_OutputFcn(hObject, eventdata, handles) 
% varargout  cell array for returning output args (see VARARGOUT);
% hObject    handle to figure
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;


% --- Executes on button press in btn_export.
function btn_export_Callback(hObject, eventdata, handles)
% hObject    handle to btn_export (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on selection change in list_stages.
function list_stages_Callback(hObject, eventdata, handles)
% hObject    handle to list_stages (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns list_stages contents as cell array
%        contents{get(hObject,'Value')} returns selected item from list_stages


% --- Executes during object creation, after setting all properties.
function list_stages_CreateFcn(hObject, eventdata, handles)
% hObject    handle to list_stages (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: listbox controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on selection change in list_actualPoles.
function list_actualPoles_Callback(hObject, eventdata, handles)
% hObject    handle to list_actualPoles (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns list_actualPoles contents as cell array
%        contents{get(hObject,'Value')} returns selected item from list_actualPoles


% --- Executes during object creation, after setting all properties.
function list_actualPoles_CreateFcn(hObject, eventdata, handles)
% hObject    handle to list_actualPoles (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: listbox controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on selection change in list_actualZeros.
function list_actualZeros_Callback(hObject, eventdata, handles)
% hObject    handle to list_actualZeros (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns list_actualZeros contents as cell array
%        contents{get(hObject,'Value')} returns selected item from list_actualZeros


% --- Executes during object creation, after setting all properties.
function list_actualZeros_CreateFcn(hObject, eventdata, handles)
% hObject    handle to list_actualZeros (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: listbox controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on selection change in list_cells.
function list_cells_Callback(hObject, eventdata, handles)
% hObject    handle to list_cells (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: contents = cellstr(get(hObject,'String')) returns list_cells contents as cell array
%        contents{get(hObject,'Value')} returns selected item from list_cells


% --- Executes during object creation, after setting all properties.
function list_cells_CreateFcn(hObject, eventdata, handles)
% hObject    handle to list_cells (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: listbox controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end


% --- Executes on button press in btn_manual.
function btn_manual_Callback(hObject, eventdata, handles)
% hObject    handle to btn_manual (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in btn_automatic.
function btn_automatic_Callback(hObject, eventdata, handles)
% hObject    handle to btn_automatic (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in btn_deleteCell.
function btn_deleteCell_Callback(hObject, eventdata, handles)
% hObject    handle to btn_deleteCell (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in btn_match.
function btn_match_Callback(hObject, eventdata, handles)
% hObject    handle to btn_match (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- Executes on button press in pushbutton9.
function pushbutton9_Callback(hObject, eventdata, handles)
% hObject    handle to pushbutton9 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)


% --- If Enable == 'on', executes on mouse press in 5 pixel border.
% --- Otherwise, executes on mouse press in 5 pixel border or over list_stages.
function list_stages_ButtonDownFcn(hObject, eventdata, handles)
% hObject    handle to list_stages (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)



function txt_R1_Callback(hObject, eventdata, handles)
% hObject    handle to txt_R1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of txt_R1 as text
%        str2double(get(hObject,'String')) returns contents of txt_R1 as a double


% --- Executes during object creation, after setting all properties.
function txt_R1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to txt_R1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function txt_R2_Callback(hObject, eventdata, handles)
% hObject    handle to txt_R2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of txt_R2 as text
%        str2double(get(hObject,'String')) returns contents of txt_R2 as a double


% --- Executes during object creation, after setting all properties.
function txt_R2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to txt_R2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function txt_R3_Callback(hObject, eventdata, handles)
% hObject    handle to txt_R3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of txt_R3 as text
%        str2double(get(hObject,'String')) returns contents of txt_R3 as a double


% --- Executes during object creation, after setting all properties.
function txt_R3_CreateFcn(hObject, eventdata, handles)
% hObject    handle to txt_R3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function txt_R4_Callback(hObject, eventdata, handles)
% hObject    handle to txt_R4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of txt_R4 as text
%        str2double(get(hObject,'String')) returns contents of txt_R4 as a double


% --- Executes during object creation, after setting all properties.
function txt_R4_CreateFcn(hObject, eventdata, handles)
% hObject    handle to txt_R4 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function txt_R5_Callback(hObject, eventdata, handles)
% hObject    handle to txt_R5 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of txt_R5 as text
%        str2double(get(hObject,'String')) returns contents of txt_R5 as a double


% --- Executes during object creation, after setting all properties.
function txt_R5_CreateFcn(hObject, eventdata, handles)
% hObject    handle to txt_R5 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function txt_R6_Callback(hObject, eventdata, handles)
% hObject    handle to txt_R6 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of txt_R6 as text
%        str2double(get(hObject,'String')) returns contents of txt_R6 as a double


% --- Executes during object creation, after setting all properties.
function txt_R6_CreateFcn(hObject, eventdata, handles)
% hObject    handle to txt_R6 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function txt_R7_Callback(hObject, eventdata, handles)
% hObject    handle to txt_R7 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of txt_R7 as text
%        str2double(get(hObject,'String')) returns contents of txt_R7 as a double


% --- Executes during object creation, after setting all properties.
function txt_R7_CreateFcn(hObject, eventdata, handles)
% hObject    handle to txt_R7 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function txt_R8_Callback(hObject, eventdata, handles)
% hObject    handle to txt_R8 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of txt_R8 as text
%        str2double(get(hObject,'String')) returns contents of txt_R8 as a double


% --- Executes during object creation, after setting all properties.
function txt_R8_CreateFcn(hObject, eventdata, handles)
% hObject    handle to txt_R8 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function txt_Ra_Callback(hObject, eventdata, handles)
% hObject    handle to txt_Ra (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of txt_Ra as text
%        str2double(get(hObject,'String')) returns contents of txt_Ra as a double


% --- Executes during object creation, after setting all properties.
function txt_Ra_CreateFcn(hObject, eventdata, handles)
% hObject    handle to txt_Ra (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function txt_Rb_Callback(hObject, eventdata, handles)
% hObject    handle to txt_Rb (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of txt_Rb as text
%        str2double(get(hObject,'String')) returns contents of txt_Rb as a double


% --- Executes during object creation, after setting all properties.
function txt_Rb_CreateFcn(hObject, eventdata, handles)
% hObject    handle to txt_Rb (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function txt_C1_Callback(hObject, eventdata, handles)
% hObject    handle to txt_C1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of txt_C1 as text
%        str2double(get(hObject,'String')) returns contents of txt_C1 as a double


% --- Executes during object creation, after setting all properties.
function txt_C1_CreateFcn(hObject, eventdata, handles)
% hObject    handle to txt_C1 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function txt_C2_Callback(hObject, eventdata, handles)
% hObject    handle to txt_C2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of txt_C2 as text
%        str2double(get(hObject,'String')) returns contents of txt_C2 as a double


% --- Executes during object creation, after setting all properties.
function txt_C2_CreateFcn(hObject, eventdata, handles)
% hObject    handle to txt_C2 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end



function txt_C3_Callback(hObject, eventdata, handles)
% hObject    handle to txt_C3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of txt_C3 as text
%        str2double(get(hObject,'String')) returns contents of txt_C3 as a double


% --- Executes during object creation, after setting all properties.
function txt_C3_CreateFcn(hObject, eventdata, handles)
% hObject    handle to txt_C3 (see GCBO)
% eventdata  reserved - to be defined in a future version of MATLAB
% handles    empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
%       See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
    set(hObject,'BackgroundColor','white');
end
